<template>
	<view class="caterDetails">
		<uv-navbar title="公告详情" @leftClick="leftClick"
			bg-color="linear-gradient(to right, #D2F1DE 0%, #E3F6E8 50% ,#D2F1DE 100%)" :fixed="true"></uv-navbar>
		<view class="caterDetails-img">
			<view class="caterDetails-tit" style="padding-top: 240rpx;text-align: center;">
				<view style="font-size: 36rpx;font-weight: bold;">{{ info.title }}</view>
			</view>
			<view style="text-align: center;line-height: 1.2;">
				<uv-parse :content="info.content" style="padding: 20rpx"></uv-parse>
			</view>
		</view>

	</view>
</template>

<script>
import { BaseUrl } from '../../../utils/req.js'
export default {
	data() {
		return {
			BaseUrl,
			info: {}
		}
	},
	onLoad(options) {
		this.Headline(options.id)
	},
	methods: {
		// 获取头条详情
		async Headline(id) {
			await this.$request.get("api/wanlshop.common/notice_detail", {
				id: id
			}).then(res => {
				console.log(res.data.data, '公告详情');
				this.info = res.data
			})
		},

		leftClick() {
			uni.navigateBack({
				delta: 1
			})
		}
	}
}

</script>
<style lang="scss" scoped>
.caterDetails {
	width: 100vw;
	height: 100vh;
	background: linear-gradient(to bottom, #D3F1DE 0%, #F4F6F5 30%, #F6F6F6 100%);

	caterDetails-img {
		background: linear-gradient(to bottom, #D3F1DE 0%, #F4F6F5 30%, #F6F6F6 100%);
	}

}
</style>
